<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:p="http://primefaces.org/ui">
<h:head>
	<title>Login | Pizzaria</title>
</h:head>
	<h:outputStylesheet library="css" name="standard.css" />
	<h:outputStylesheet library="css/login" name="reset.css" />
	<h:outputStylesheet library="css/login" name="styles.css" />
<h:body>
<div id="container-img"></div>
	<div id="container">
	<h:form>
		<p:outputPanel id="panel">
			<p:focus context="panel" />
				<label for="login"> 
					<h:outputLabel value="Login:" />
				</label>

				<p:inputText id="login" value="#{loginBean.usuario.login}"
					required="true" requiredMessage="Preencha o campo login" />

				<label for="senha"> 
					<h:outputLabel value="Senha:" />
				</label>
				<p:password id="senha" value="#{loginBean.usuario.senha}"
					required="true" requiredMessage="Preencha o campo senha" />

				<div id="lower">
					<center>
						<p:commandButton value="Acessar"
							actionListener="#{loginBean.logar}" update="panel"
							style="margin:0; margin-top: 10px;" />
					</center>
				</div>

			<p:messages id="msgs" />

		</p:outputPanel>
	</h:form>

	<p:ajaxStatus onstart="PF('statusDialog').show()"
		onsuccess="PF('statusDialog').hide()" />

	<p:dialog widgetVar="statusDialog" modal="true" draggable="false"
		closable="false" resizable="false" showHeader="false">
		<p:graphicImage library="images" name="ajaxloadingbar.gif" />
	</p:dialog>
	</div>
	</h:body>
</html>